{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/home/filipe/.virtualenvs/iris/lib/python2.7/site-packages/folium/__init__.py\n",
      "0.2.0\n"
     ]
    }
   ],
   "source": [
    "import folium\n",
    "\n",
    "print(folium.__file__)\n",
    "print(folium.__version__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;base64,CiAgICAgICAgPCFET0NUWVBFIGh0bWw+CiAgICAgICAgPGhlYWQ+CiAgICAgICAgICAgIAogICAgICAgIAogICAgICAgICAgICA8bWV0YSBodHRwLWVxdWl2PSJjb250ZW50LXR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD1VVEYtOCIgLz4KICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9sZWFmbGV0LzAuNy4zL2xlYWZsZXQuanMiPjwvc2NyaXB0PgogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgPHNjcmlwdCBzcmM9Imh0dHBzOi8vYWpheC5nb29nbGVhcGlzLmNvbS9hamF4L2xpYnMvanF1ZXJ5LzEuMTEuMS9qcXVlcnkubWluLmpzIj48L3NjcmlwdD4KICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIDxzY3JpcHQgc3JjPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9qcy9ib290c3RyYXAubWluLmpzIj48L3NjcmlwdD4KICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIDxzY3JpcHQgc3JjPSJodHRwczovL3Jhd2dpdGh1Yi5jb20vbHZvb2dkdC9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAvZGV2ZWxvcC9kaXN0L2xlYWZsZXQuYXdlc29tZS1tYXJrZXJzLmpzIj48L3NjcmlwdD4KICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9sZWFmbGV0Lm1hcmtlcmNsdXN0ZXIvMC40LjAvbGVhZmxldC5tYXJrZXJjbHVzdGVyLXNyYy5qcyI+PC9zY3JpcHQ+CiAgICAgICAgCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgIAogICAgICAgICAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvbGVhZmxldC5tYXJrZXJjbHVzdGVyLzAuNC4wL2xlYWZsZXQubWFya2VyY2x1c3Rlci5qcyI+PC9zY3JpcHQ+CiAgICAgICAgCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgIAogICAgICAgICAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL2xlYWZsZXQvMC43LjMvbGVhZmxldC5jc3MiIC8+CiAgICAgICAgCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgIAogICAgICAgICAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vbWF4Y2RuLmJvb3RzdHJhcGNkbi5jb20vYm9vdHN0cmFwLzMuMi4wL2Nzcy9ib290c3RyYXAubWluLmNzcyIgLz4KICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvY3NzL2Jvb3RzdHJhcC10aGVtZS5taW4uY3NzIiAvPgogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2ZvbnQtYXdlc29tZS80LjEuMC9jc3MvZm9udC1hd2Vzb21lLm1pbi5jc3MiIC8+CiAgICAgICAgCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgIAogICAgICAgICAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vcmF3Z2l0LmNvbS9sdm9vZ2R0L0xlYWZsZXQuYXdlc29tZS1tYXJrZXJzLzIuMC9kZXZlbG9wL2Rpc3QvbGVhZmxldC5hd2Vzb21lLW1hcmtlcnMuY3NzIiAvPgogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9sZWFmbGV0Lm1hcmtlcmNsdXN0ZXIvMC40LjAvTWFya2VyQ2x1c3Rlci5EZWZhdWx0LmNzcyIgLz4KICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvbGVhZmxldC5tYXJrZXJjbHVzdGVyLzAuNC4wL01hcmtlckNsdXN0ZXIuY3NzIiAvPgogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vcHl0aG9uLXZpc3VhbGl6YXRpb24vZm9saXVtL21hc3Rlci9mb2xpdW0vdGVtcGxhdGVzL2xlYWZsZXQuYXdlc29tZS5yb3RhdGUuY3NzIiAvPgogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgPHN0eWxlPgoKICAgICAgICAgICAgaHRtbCwgYm9keSB7CiAgICAgICAgICAgICAgICB3aWR0aDogMTAwJTsKICAgICAgICAgICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICAgICAgICAgIG1hcmdpbjogMDsKICAgICAgICAgICAgICAgIHBhZGRpbmc6IDA7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAjbWFwIHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlOwogICAgICAgICAgICAgICAgdG9wOjA7CiAgICAgICAgICAgICAgICBib3R0b206MDsKICAgICAgICAgICAgICAgIHJpZ2h0OjA7CiAgICAgICAgICAgICAgICBsZWZ0OjA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIDwvc3R5bGU+CiAgICAgICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgPHN0eWxlPiAjbWFwXzA5OWIzOTFhMTlhNDRmMmU5YjM1NDU2OWQwZjAzMWEyIHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uIDogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICB3aWR0aCA6IDEwMC4wJTsKICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgbGVmdDogMC4wJTsKICAgICAgICAgICAgICAgIHRvcDogMC4wJTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgPC9zdHlsZT4KICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICA8L2hlYWQ+CiAgICAgICAgPGJvZHk+CiAgICAgICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF8wOTliMzkxYTE5YTQ0ZjJlOWIzNTQ1NjlkMGYwMzFhMiIgPjwvZGl2PgogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgIDwvYm9keT4KICAgICAgICA8c2NyaXB0PgogICAgICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgCgogICAgICAgICAgICB2YXIgc291dGhXZXN0ID0gTC5sYXRMbmcoLTkwLCAtMTgwKTsKICAgICAgICAgICAgdmFyIG5vcnRoRWFzdCA9IEwubGF0TG5nKDkwLCAxODApOwogICAgICAgICAgICB2YXIgYm91bmRzID0gTC5sYXRMbmdCb3VuZHMoc291dGhXZXN0LCBub3J0aEVhc3QpOwoKICAgICAgICAgICAgdmFyIG1hcF8wOTliMzkxYTE5YTQ0ZjJlOWIzNTQ1NjlkMGYwMzFhMiA9IEwubWFwKCdtYXBfMDk5YjM5MWExOWE0NGYyZTliMzU0NTY5ZDBmMDMxYTInLCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZW50ZXI6Wy0xMCwtMjBdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbTogNCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heEJvdW5kczogYm91bmRzLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXJzOiBbXSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9jZWNiMDg3YTEwNjI0ZTg3Yjk1N2MzNzE0NmRmNTFkMiA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAxOCwKICAgICAgICAgICAgICAgICAgICBtaW5ab29tOiAxLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0aW9uOiAnRGF0YSBieSA8YSBocmVmPSJodHRwOi8vb3BlbnN0cmVldG1hcC5vcmciPk9wZW5TdHJlZXRNYXA8L2E+LCB1bmRlciA8YSBocmVmPSJodHRwOi8vd3d3Lm9wZW5zdHJlZXRtYXAub3JnL2NvcHlyaWdodCI+T0RiTDwvYT4uJywKICAgICAgICAgICAgICAgICAgICBkZXRlY3RSZXRpbmE6IGZhbHNlCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgKS5hZGRUbyhtYXBfMDk5YjM5MWExOWE0NGYyZTliMzU0NTY5ZDBmMDMxYTIpOwoKICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzI2MTY2OTM5NzFjODQyYzNhZTg2ZDQwMWQ0MDJjNTU3ID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cDovL3NlcnZpY2VzLmFyY2dpc29ubGluZS5jb20vYXJjZ2lzL3Jlc3Qvc2VydmljZXMvT2NlYW4vV29ybGRfT2NlYW5fQmFzZS9NYXBTZXJ2ZXIvdGlsZS97en0ve3l9L3t4fScsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbWF4Wm9vbTogMTgsCiAgICAgICAgICAgICAgICAgICAgbWluWm9vbTogMSwKICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGlvbjogJ0VTUkknLAogICAgICAgICAgICAgICAgICAgIGRldGVjdFJldGluYTogZmFsc2UKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF8wOTliMzkxYTE5YTQ0ZjJlOWIzNTQ1NjlkMGYwMzFhMik7CgogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfYWU4NzNlYjc2MmM1NDhiYjhjYjQxOWQ2ZWRhMGFhZDAgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICdodHRwOi8vc2VydmljZXMuYXJjZ2lzb25saW5lLmNvbS9hcmNnaXMvcmVzdC9zZXJ2aWNlcy9Xb3JsZF9QaHlzaWNhbF9NYXAvTWFwU2VydmVyL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JywKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAxOCwKICAgICAgICAgICAgICAgICAgICBtaW5ab29tOiAxLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0aW9uOiAnRVNSSScsCiAgICAgICAgICAgICAgICAgICAgZGV0ZWN0UmV0aW5hOiBmYWxzZQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwXzA5OWIzOTFhMTlhNDRmMmU5YjM1NDU2OWQwZjAzMWEyKTsKCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl8zMDEwZTg0NzJjZGM0M2E4YmRjNDAwYzU3N2I4NzBkOCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHA6Ly9zZXJ2aWNlcy5hcmNnaXNvbmxpbmUuY29tL2FyY2dpcy9yZXN0L3NlcnZpY2VzL1dvcmxkX1RvcG9fTWFwL01hcFNlcnZlci9NYXBTZXJ2ZXIvdGlsZS97en0ve3l9L3t4fScsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbWF4Wm9vbTogMTgsCiAgICAgICAgICAgICAgICAgICAgbWluWm9vbTogMSwKICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGlvbjogJ0VTUkknLAogICAgICAgICAgICAgICAgICAgIGRldGVjdFJldGluYTogZmFsc2UKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF8wOTliMzkxYTE5YTQ0ZjJlOWIzNTQ1NjlkMGYwMzFhMik7CgogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfYjhhZTEwNzJjNTA4NDYwNTgzYjg4MjhiYjg3OWNiZjMgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICdodHRwOi8vc2VydmljZXMuYXJjZ2lzb25saW5lLmNvbS9hcmNnaXMvcmVzdC9zZXJ2aWNlcy9Xb3JsZF9TaGFkZWRfUmVsaWVmL01hcFNlcnZlci9NYXBTZXJ2ZXIvdGlsZS97en0ve3l9L3t4fScsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbWF4Wm9vbTogMTgsCiAgICAgICAgICAgICAgICAgICAgbWluWm9vbTogMSwKICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGlvbjogJ0VTUkknLAogICAgICAgICAgICAgICAgICAgIGRldGVjdFJldGluYTogZmFsc2UKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF8wOTliMzkxYTE5YTQ0ZjJlOWIzNTQ1NjlkMGYwMzFhMik7CgogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMTRkNDUxMTMyOWIzNDFkZGIwM2ViZTYxNTM4MWYzNTYgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICdodHRwOi8vc2VydmljZXMuYXJjZ2lzb25saW5lLmNvbS9hcmNnaXMvcmVzdC9zZXJ2aWNlcy9Xb3JsZF9UZXJyYWluX0Jhc2UvTWFwU2VydmVyL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JywKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAxOCwKICAgICAgICAgICAgICAgICAgICBtaW5ab29tOiAxLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0aW9uOiAnRVNSSScsCiAgICAgICAgICAgICAgICAgICAgZGV0ZWN0UmV0aW5hOiBmYWxzZQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwXzA5OWIzOTFhMTlhNDRmMmU5YjM1NDU2OWQwZjAzMWEyKTsKCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl8zMDVjMGE2OWQ5YmU0N2Y4YWJiNWFiMWM3ZTVlZWY2ZCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHA6Ly9zZXJ2aWNlcy5hcmNnaXNvbmxpbmUuY29tL2FyY2dpcy9yZXN0L3NlcnZpY2VzL1dvcmxkX1N0cmVldF9NYXAvTWFwU2VydmVyL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JywKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAxOCwKICAgICAgICAgICAgICAgICAgICBtaW5ab29tOiAxLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0aW9uOiAnRVNSSScsCiAgICAgICAgICAgICAgICAgICAgZGV0ZWN0UmV0aW5hOiBmYWxzZQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwXzA5OWIzOTFhMTlhNDRmMmU5YjM1NDU2OWQwZjAzMWEyKTsKCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9jYzU5YzQ2ZjY4MjE0YjBiYjIyOWJlNDIxOTNhMDhlZiA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHA6Ly9zZXJ2aWNlcy5hcmNnaXNvbmxpbmUuY29tL2FyY2dpcy9yZXN0L3NlcnZpY2VzL1dvcmxkX0ltYWdlcnkvTWFwU2VydmVyL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JywKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAxOCwKICAgICAgICAgICAgICAgICAgICBtaW5ab29tOiAxLAogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0aW9uOiAnRVNSSScsCiAgICAgICAgICAgICAgICAgICAgZGV0ZWN0UmV0aW5hOiBmYWxzZQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwXzA5OWIzOTFhMTlhNDRmMmU5YjM1NDU2OWQwZjAzMWEyKTsKCiAgICAgICAgCiAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9mZTk0YjMwY2FhMTU0OWQ1YTRmZjNhMWZiNmYwOGNkZSA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHA6Ly9zZXJ2aWNlcy5hcmNnaXNvbmxpbmUuY29tL2FyY2dpcy9yZXN0L3NlcnZpY2VzL09jZWFuL1dvcmxkX09jZWFuX1JlZmVyZW5jZS9NYXBTZXJ2ZXIvdGlsZS97en0ve3l9L3t4fScsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbWF4Wm9vbTogMTgsCiAgICAgICAgICAgICAgICAgICAgbWluWm9vbTogMSwKICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGlvbjogJ0VTUkknLAogICAgICAgICAgICAgICAgICAgIGRldGVjdFJldGluYTogZmFsc2UKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF8wOTliMzkxYTE5YTQ0ZjJlOWIzNTQ1NjlkMGYwMzFhMik7CgogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfYWM0MWI5ZWJkYjlmNDMyY2JiMzJhODIwNzQ1ZDg4ZjEgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICdodHRwOi8vc2VydmljZXMuYXJjZ2lzb25saW5lLmNvbS9hcmNnaXMvcmVzdC9zZXJ2aWNlcy9OYXRHZW9fV29ybGRfTWFwL01hcFNlcnZlci9NYXBTZXJ2ZXIvdGlsZS97en0ve3l9L3t4fScsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbWF4Wm9vbTogMTgsCiAgICAgICAgICAgICAgICAgICAgbWluWm9vbTogMSwKICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGlvbjogJ0VTUkknLAogICAgICAgICAgICAgICAgICAgIGRldGVjdFJldGluYTogZmFsc2UKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF8wOTliMzkxYTE5YTQ0ZjJlOWIzNTQ1NjlkMGYwMzFhMik7CgogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAKICAgICAgICAgICAgdmFyIGxheWVyX2NvbnRyb2xfZWU0NzAwMzdlZTM3NDhmZDhkMTE0ZmQzYmNjODdjMWYgPSB7CiAgICAgICAgICAgICAgICBiYXNlX2xheWVycyA6IHsgIm9wZW5zdHJlZXRtYXAiIDogdGlsZV9sYXllcl9jZWNiMDg3YTEwNjI0ZTg3Yjk1N2MzNzE0NmRmNTFkMiwgfSwKICAgICAgICAgICAgICAgIG92ZXJsYXlzIDogeyAiV29ybGRfT2NlYW5fQmFzZSIgOiB0aWxlX2xheWVyXzI2MTY2OTM5NzFjODQyYzNhZTg2ZDQwMWQ0MDJjNTU3LCJXb3JsZF9QaHlzaWNhbF9NYXAiIDogdGlsZV9sYXllcl9hZTg3M2ViNzYyYzU0OGJiOGNiNDE5ZDZlZGEwYWFkMCwiV29ybGRfVG9wb19NYXAiIDogdGlsZV9sYXllcl8zMDEwZTg0NzJjZGM0M2E4YmRjNDAwYzU3N2I4NzBkOCwiV29ybGRfU2hhZGVkX1JlbGllZiIgOiB0aWxlX2xheWVyX2I4YWUxMDcyYzUwODQ2MDU4M2I4ODI4YmI4NzljYmYzLCJXb3JsZF9UZXJyYWluX0Jhc2UiIDogdGlsZV9sYXllcl8xNGQ0NTExMzI5YjM0MWRkYjAzZWJlNjE1MzgxZjM1NiwiV29ybGRfU3RyZWV0X01hcCIgOiB0aWxlX2xheWVyXzMwNWMwYTY5ZDliZTQ3ZjhhYmI1YWIxYzdlNWVlZjZkLCJXb3JsZF9JbWFnZXJ5IiA6IHRpbGVfbGF5ZXJfY2M1OWM0NmY2ODIxNGIwYmIyMjliZTQyMTkzYTA4ZWYsIldvcmxkX09jZWFuX1JlZmVyZW5jZSIgOiB0aWxlX2xheWVyX2ZlOTRiMzBjYWExNTQ5ZDVhNGZmM2ExZmI2ZjA4Y2RlLCJOYXRHZW9fV29ybGRfTWFwIiA6IHRpbGVfbGF5ZXJfYWM0MWI5ZWJkYjlmNDMyY2JiMzJhODIwNzQ1ZDg4ZjEsIH0KICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIEwuY29udHJvbC5sYXllcnMoCiAgICAgICAgICAgICAgICBsYXllcl9jb250cm9sX2VlNDcwMDM3ZWUzNzQ4ZmQ4ZDExNGZkM2JjYzg3YzFmLmJhc2VfbGF5ZXJzLAogICAgICAgICAgICAgICAgbGF5ZXJfY29udHJvbF9lZTQ3MDAzN2VlMzc0OGZkOGQxMTRmZDNiY2M4N2MxZi5vdmVybGF5cwogICAgICAgICAgICAgICAgKS5hZGRUbyhtYXBfMDk5YjM5MWExOWE0NGYyZTliMzU0NTY5ZDBmMDMxYTIpOwogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgIDwvc2NyaXB0PgogICAgICAgIA==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;\"></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7f5403f84e90>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mapa = folium.Map(location=[-10, -20], zoom_start=4)\n",
    "\n",
    "pre = 'http://services.arcgisonline.com/arcgis/rest/services'\n",
    "pos = 'MapServer/tile/{z}/{y}/{x}'\n",
    "\n",
    "ESRI = dict(World_Ocean_Base='Ocean/World_Ocean_Base',\n",
    "            World_Ocean_Reference='Ocean/World_Ocean_Reference',\n",
    "            NatGeo_World_Map='NatGeo_World_Map/MapServer',\n",
    "            World_Imagery='World_Imagery/MapServer',\n",
    "            World_Physical_Map='World_Physical_Map/MapServer',\n",
    "            World_Shaded_Relief='World_Shaded_Relief/MapServer',\n",
    "            World_Street_Map='World_Street_Map/MapServer',\n",
    "            World_Terrain_Base='World_Terrain_Base/MapServer',\n",
    "            World_Topo_Map='World_Topo_Map/MapServer')\n",
    "\n",
    "for name, tile in ESRI.items():\n",
    "    url = '{}/{}/{}'.format(pre, tile, pos)\n",
    "    w = folium.TileLayer(tiles=url,\n",
    "                         name=name,\n",
    "                         attr='ESRI',\n",
    "                         overlay=True)\n",
    "    w.add_to(mapa)\n",
    "\n",
    "\n",
    "# FIXME: active=False by default.\n",
    "mapa.add_children(folium.LayerControl())\n",
    "mapa"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# TODO: Add the rest of the options to the template and docstrings."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "mapa = folium.Map(location=[-10, -20], zoom_start=1)\n",
    "\n",
    "url = ('http://services.arcgisonline.com/ArcGIS/'\n",
    "       'rest/services/Specialty/World_Navigation_Charts')\n",
    "\n",
    "kw = dict(minZoom=0, # Number\n",
    "          maxZoom=18, # Number\n",
    "          maxNativeZoom=None, # null, Number\n",
    "          tileSize=256,  # Number\n",
    "          subdomains='abc', # 'abc', String or String[]\n",
    "          errorTileUrl='', # String\n",
    "          attr='', # String\n",
    "          tms=False, # Boolean\n",
    "          continuousWorld=False, # Boolean\n",
    "          noWrap=False, # Boolean\n",
    "          zoomOffset=0, # Number\n",
    "          zoomReverse=False, # Boolean\n",
    "          opacity=1.0, # Number\n",
    "          zIndex=None, # null, Number\n",
    "          unloadInvisibleTiles=False, # Boolean\n",
    "          updateWhenIdle=False, # Boolean\n",
    "          detectRetina=False, # Boolean\n",
    "          reuseTiles=False, # Boolean\n",
    "          bounds=None, # null, LatLngBounds\n",
    "         )\n",
    "\n",
    "w = folium.TileLayer(tiles=url,\n",
    "                     name='World_Navigation_Charts',\n",
    "                     overlay=True, **kw)\n",
    "\n",
    "mapa.add_children(folium.LayerControl())\n",
    "mapa"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Iris (Python 2)",
   "language": "python",
   "name": "iris_python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
